<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*鼠标悬停文字颜色为红色,背景色为绿色*/
        a:hover {
            color: red;
            text-decoration: none;
            background-color: green;
        }

        /*div 悬停字变成绿色*/
        div:hover {
            color: green;
        }
    </style>
</head>
<body>
<!--鼠标悬停文字颜色为红色-->
<a href="#">这是超链接</a>
<div>div</div>
</body>
</html>